package ch.bfh.fbi.mobiComp2013.sensornet.earthquake;

import ch.bfh.fbi.mobiComp2013.sensornet.implementation.MessageBody;
import ch.bfh.fbi.mobiComp2013.sensornet.implementation.MessageType;

public class EarthquakeBody extends MessageBody {
	public final MessageType type;
	
	public EarthquakeBody(MessageType type){
	    this.type = type;
	}

	@Override
	public String toString() {
		return "EarthquakeBody [type=" + type + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EarthquakeBody other = (EarthquakeBody) obj;
		if (type != other.type)
			return false;
		return true;
	}
}
